package santeclair.referentiel.optique.tarification.bean.detailTarif;

import java.math.BigDecimal;

public class TarifBuilder {

    private final DetailTarifBuilder detailTarifBuilder;

    private StatutTarif statutTarif;
    private String code;
    private BigDecimal tarif;
    private String message;

    private TarifBuilder(DetailTarifBuilder detailTarifBuilder) {
        this.detailTarifBuilder = detailTarifBuilder;
    }

    public TarifBuilder statutTarif(StatutTarif statutTarif) {
        this.statutTarif = statutTarif;
        return this;
    }

    public TarifBuilder code(String code) {
        this.code = code;
        return this;
    }

    public TarifBuilder message(String message) {
        this.message = message;
        return this;
    }

    public TarifBuilder tarif(BigDecimal tarif) {
        this.tarif = tarif;
        return this;
    }

    public Tarif build() {
        return new Tarif(statutTarif, code, tarif, message);
    }

    public DetailTarifBuilder and() {
        return detailTarifBuilder;
    }

    public static TarifBuilder newInstance(DetailTarifBuilder detailTarifBuilder) {
        return new TarifBuilder(detailTarifBuilder);
    }

}
